docs(mobile/3): note Inertia 3 axios requirement#370
Merged
shanerbaner82 merged 1 commit intomainfrom Apr 23, 2026
Merged
Conversation
NativePHP Mobile intercepts axios at bundle time to route HTTP requests through the embedded PHP runtime. Inertia 3 removed axios in favour of native fetch, so fresh Inertia 3 projects fail the NativePHP build until they declare axios as a direct dependency. Adds an aside to mobile/3/getting-started/development in the section that already introduces the nativephpMobile Vite plugin — that's the natural home for build-time concerns — with the single `npm install axios` step and a link to Inertia's client-side-setup docs for wiring it up. Pairs with NativePHP/mobile-air#100 which makes the Vite plugin fail early with an error pointing here and at the Inertia docs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8c356a5 to
90840c5
Compare
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an aside to `mobile/3/getting-started/development.md` (in the existing nativephpMobile Vite plugin section) explaining that fresh Inertia 3 projects need to reinstall axios for NativePHP Mobile to work.
Context
NativePHP Mobile intercepts `axios` at bundle time and swaps its transport adapter so every HTTP request routes through the embedded PHP runtime. Through Inertia 2 this was always satisfied transitively by `@inertiajs/vue3` / `@inertiajs/react`. Inertia 3 removed axios in favour of native `fetch`, so fresh Inertia 3 projects now build cleanly into a NativePHP app that can't talk to its own backend.
The paired package change — NativePHP/mobile-air#100 — makes the Vite plugin fail fast (checking the project's `package.json` for a declared axios dependency) with an error pointing users here and at the Inertia docs.
Placement
Inline aside inside Build your frontend → The `nativephpMobile` Vite plugin, right after the `--mode=ios`/`--mode=android` build commands. That's the natural home for build-time concerns, and the surrounding section already contextualises the Vite plugin where the check fires.
Preview
🤖 Generated with Claude Code